# 1.用while循环计算1-100的累计和
count=0
result=0
while count<101:
    result=result+count
    count+=1
print(result)

# 2.用while方法依次打印1-100
i=0
while i<100:
    i+=1
    print(i)
# 3.用for循环计算1-100的累计和
result=0
for i in range(1,101):
    result+=i
print(result)

# 4.用for循环依次打印1-100
for i in range(1,101):
    print(i)